//
//  LHWelcomeViewController.swift
//  LHWeibo
//
//  Created by 李浩 on 16/4/7.
//  Copyright © 2016年 李浩. All rights reserved.
//

import UIKit

import SnapKit

class LHWelcomeViewController: UIViewController {

    
    override func loadView() {
        
        
        view = backimg
        
    }
    
    
    
    override func viewDidLoad() {
        super.viewDidLoad()

        
        
   
     
        

        setUpUI()
       
        
        
        
        
    }

 
    //赖加载控件
    
    lazy var backimg : UIImageView = {
    
        
        let backimgview = UIImageView()
        
        
        backimgview.image = UIImage(named: "ad_background")
        
 
    
       return backimgview
    
    }()
    

    
    lazy var iconimageview : UIImageView = {
        
        let iconimgview = UIImageView()
        
        iconimgview.image = UIImage(named: "avatar_default_big")
        
        //圆角
        
        iconimgview.layer.cornerRadius = 170/4
        
        //设置边框
        
        iconimgview.layer.borderWidth = 2
        
        
        //剪
        
        iconimgview.clipsToBounds = true
        
        
        iconimgview.layer.borderColor = UIColor.yellowColor().CGColor
        
        
        return iconimgview
        
        
        }()
    
    
    lazy var nameLabe : UILabel = {
    
        
        let lb = UILabel()
        
        
        
        lb.text = "欢迎归来"

        
        
        
        
        
        
        return lb
    
    
    }()
    
    
    func setUpUI() {
    
        
        view.addSubview(iconimageview)
        
        view.addSubview(nameLabe)
        
        
        iconimageview.snp_makeConstraints { (make) -> Void in
            
            
            make.centerX.equalTo(view.snp_centerX)
            
            
            make.centerY.equalTo(view.snp_centerY).offset(-200)
            
            
        }
    
    
        nameLabe.snp_makeConstraints { (make) -> Void in
            
            
            make.centerX.equalTo(view.snp_centerX)
            
            
            make.centerY.equalTo(view.snp_centerY).offset(100)
            
            
            
        }
        
        
        
    
    
    }
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    

}
